﻿#region

using Rio.Framework.Pages.Context;

#endregion

namespace Rio.Framework.Pages.AppCode.Context
{
    public class UserWebContext
    {
        #region Readonly & Static Fields

        private static UserContext userParameters;

        #endregion

        #region Class Methods

        public static UserContext GetCurrent()
        {
            if (userParameters == null)
                userParameters = new UserContext();
            return userParameters;
        }

        #endregion
    }

    public class UserContext
    {
        #region Readonly & Static Fields

        private bool? keepCriteriaOnFlowIndexing;

        #endregion

        #region Class Properties

        public bool? KeepCriteriaOnFlowIndexing
        {
            get
            {
                if (keepCriteriaOnFlowIndexing == null)
                {
                    keepCriteriaOnFlowIndexing = GlobalWebContext.KeepCriteriaOnFlowIndexing;
                }
                return keepCriteriaOnFlowIndexing.Value;
            }
            set
            {
                keepCriteriaOnFlowIndexing = value;
            }
        }

        #endregion
    }
}